package com.yundashi.floatview;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

public class ActivityA extends BaseActivity {

    @Override
    public boolean floatViewShow(View view) {
        TextView tvMsg = view.findViewById(R.id.fv_msg);
        tvMsg.setText("这是 A 页面");

        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(ActivityA.this, "我被点击了", Toast.LENGTH_SHORT).show();
            }
        });
        return true;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_a);
        setTitle("A");
    }

    public void change(View view) {
        startActivity(new Intent(this, ActivityB.class));
    }
}
